/* TCSS 590A - Cybernetics and Systems
 * Group Project - Modeling
 * By Barry Jones, Naren Meadem, Michael Pitts, Yuan Tao
 * Fall 2012, University of Washington, Tacoma
 */
package model.delayed.strategic;

import java.util.Collection;

import model.delayed.Event;
import model.delayed.ModelController;


/**
 * An Over ModelController that has multiple ModelController opjects within.
 * @author Michael Pitts
 * @version Nov 30, 2012
 */
public class OverController implements ModelController
{
	/** The strategic ModelController that attempts to model the outside world.*/
	private final ModelController my_strategic;
	
	/** The tactical ModelController that attempts to influence the outside world.*/
	private final ModelController my_tactical;
	
	/** The logistical ModelController that moves funds internally.*/
	private final ModelController my_logistical;
	
	/**
	 * Generates a new OverController with the given sub-controllers.
	 * @param the_strategic is the strategic controller.
	 * @param the_tactical is the tactical controller.
	 * @param the_logistical is the logistical controller.
	 */
	public OverController(final ModelController the_strategic, 
			final ModelController the_tactical, final ModelController the_logistical)
	{
		my_strategic = the_strategic;
		my_tactical = the_tactical;
		my_logistical = the_logistical;
	}
	
	@Override public Collection<Event> compute(final long the_time,
			final Collection<Event> the_events)
	{
		my_strategic.compute(the_time, the_events);
		my_tactical.compute(the_time, the_events);
		my_logistical.compute(the_time, the_events);
		return the_events;
	}

}
